<template>
    <view class="cu-avatar round"
          :style="`height:${uni2px(size)}px;width:${uni2px(size)}px;
        background-image:url(${checkURL(src)?src:(prefix+src)})`">
    </view>
</template>

<script setup lang="ts">
import {defineProps} from "vue";

import {imagePathPrefix} from '/settings'
import {checkURL} from "@/utils";
import {uni2px} from "@/utils";

const prefix = imagePathPrefix


const props = defineProps({
    src: {
        type: String,
        default: 'https://scpic2.chinaz.net/Files/pic/webjs1/202007/jiaoben7775_s_w285.jpg',
    },
    size: {
        type: Number,
        default: 148
    }
})

</script>

<style scoped>

</style>